import com.ynny.Dao.StudentsDao;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class StudentsTest {
    @Test
    public void test() {
        ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("Students.xml");
        StudentsDao studentsDao = applicationContext.getBean("studentsDao", StudentsDao.class);
//        studentsDao.insert("001", "张三", "大二", "计算机101", "男");
//        studentsDao.insert("002", "李四", "大一", "计算机103", "男");
//        studentsDao.insert("003", "王五", "大三", "计算机106", "男");

        studentsDao.updateByName("张三", "001", "大一", "计算机101", "女");

        System.out.println(studentsDao.FindAll());
        System.out.println(studentsDao.FindByNumber("001"));

    }
}
